using Wuther.Infrastructure.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;

namespace Wuther.Infrastructure.Permissions;

public partial class InfrastructurePermissionDefinitionProvider : PermissionDefinitionProvider
{
    public override void Define(IPermissionDefinitionContext context)
    {
        //var myGroup = context.AddGroup(InfrastructurePermissions.GroupName);

        //Define your own permissions here. Example:
        //myGroup.AddPermission(InfrastructurePermissions.MyPermission1, L("Permission:MyPermission1"));
        var myGroup = context.AddGroup(InfrastructurePermissions.GroupName, L("Permission:Infrastructure"));
        //Define your own permissions here. Example:
        AddPermission(myGroup);
    }

    private static LocalizableString L(string name)
    {
        return LocalizableString.Create<InfrastructureResource>(name);
    }
}
